import axios from 'axios'

const useDog = () => {
  const dogList = reactive(['https://images.dog.ceo/breeds/pembroke/n02113023_4373.jpg'])
  const addDog = async () => {
    let res = await axios({
      url: 'https://dog.ceo/api/breed/pembroke/images/random',
      method: 'get',
    })
    console.log('接口返回res：', res)
    dogList.push(res.data.message)
  }
  return { dogList, addDog }
}
export default useDog
